Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 8 - Light Objects / Light Objects Reference
Data Structures


Directional Light Data Structure

You use a directional light data structure to get or set information about a directional light source. A directional light data structure is defined by the TQ3DirectionalLightData data type.

typedef struct TQ3DirectionalLightData {
   TQ3LightData               lightData;
   TQ3Boolean                 castsShadows;
   TQ3Vector3D                direction;
} TQ3DirectionalLightData;
Field Description
lightData
A light data structure specifying basic information about the directional light.
castsShadows
A Boolean value that indicates whether the directional light casts shadows (kQ3True) or not (kQ3False).
direction
The direction of the directional light. Note that the direction is defined as a world-space vector away from the light source. This vector does not need to be normalized, but its length must be greater than 0.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996